#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 1 + 5;
const int MOD = 998244353;


ll qpow(__int128_t a, __int128_t b, ll p = MOD) {
    __int128_t res = 1;
    while (b) {
        if (b & 1) res = res * a % p;
        a = a * a % p;
        b >>= 1;
    }
    return res % MOD;
}

int main() {
    ll n, k, m;
    cin >> n >> k >> m;

    ll res = qpow(m, qpow(k, n, MOD - 1) + MOD - 1);
    cout << res << endl;

}